//Accepted
#include <cstdio>


int x, y, t, n, i, j, a, b;
int main(){
	//freopen("in.txt","r",stdin);

	scanf("%d", &t);
	for(i=1;i<=t;++i){
		scanf("%d", &n);
		x=y=0;
		scanf("%d", &a);
		for(j=1;j<n;++j){
			scanf("%d", &b);
			if(a<b)x++;
			if(a>b)y++;
			a=b;
		}
		printf("Case %d: %d %d\n", i, x, y);
		
	}
	return 0;
}
